<?php

namespace app\api\controller;

use app\api\model\Area;
use app\api\model\BannerModel;
use app\api\model\BossModel;
use app\api\model\CompanyCateModel;
use app\api\model\CompanyPackageModel;
use app\api\model\GoodsCateModel;
use app\api\model\GoodsModel;
use app\api\model\HandlerModel;
use app\api\model\SpecialCateModel;
use app\api\model\SpecialModel;

class Index extends Api
{
     protected $noNeedLogin =["*"];
    public function getBanner()
    {
        $data = (new BannerModel())->getBanner();
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }


    public function getAccountCate()
    {
        $data = (new SpecialCateModel())->getAccountCate();
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }


    public function getCityList(){
        $data = (new Area())->getCityList();
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }


    //获取业务列表
    public function getSpecial(){
        $data = (new SpecialCateModel())->getSpecial($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }

    //获取业务列表
    public function getSearchSpecial(){
        $data = (new SpecialCateModel())->getSearchSpecial($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }




    public function getCompanyPackage(){
        $data = (new CompanyPackageModel())->getCompanyPackage($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }


    public function getGoodsList()
    {
        $data = (new GoodsModel())->getGoodsList($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }


    public function getGoodsCate(){
        $data = (new GoodsCateModel())->getGoodsCate($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }


    public function getAdviseInfo(){
        $data = (new HandlerModel())->getAdviseInfo($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);

    }


    public function getBossList(){
        $data = (new BossModel())->getBossList();
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }


}